import { Navigate, useRoutes } from 'react-router-dom'
import Home from '../views/Home'
import Hots from '../views/Home/Hots'
import ComingSoon from '../views/Home/ComingSoon'
import Detail from '../views/Detail'
const RouterView = () => {
    const routes = useRoutes([
        {
            path: '/',
            element: <Home />,
            children: [
                {
                    path: '/',
                    element: <Navigate to='/hots' />
                },
                {
                    path: '/hots',
                    element: <Hots />
                },
                {
                    path:'/comingSoon',
                    element:<ComingSoon />
                }
            ]
        },
        {
            path: '/detail/:id',
            element: <Detail />
        }
    ])
    return routes
}
export default RouterView